package bao;

public class CarFactory {
    public static Car createCar(String type){
        Car car=null;
        if(type.equals("bmw")){
            car=new Bmw();
        }else if(type.equals("benz")){
            car=new Benz();
        }
        return car;
    }
}
